package com.janj.service;

import com.janj.bean.Course;
import com.janj.dao.CourseOnStudentMapper;
import com.janj.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class CourseOnStudentServiceImpl implements CourseOnStudentService {


    @Override
    public List<Course> selectCourseOnStudent() {
        SqlSession session = MyBatisUtils.getSqlSession();
        CourseOnStudentMapper mapper = session.getMapper(CourseOnStudentMapper.class);
        List<Course> array = mapper.selectCourseOnStudent();
        MyBatisUtils.close();
        return array;
    }
}
